var height_banner_clear = 250;
var pre_expand_clear	=	'true';
var width_banner_clear = 300;
var fullheight_banner_clear = 250;
var fullwidth_banner_clear = 600;
var impressionTracking_clear = '';
var banner_standard_url_clear = "http://img.ad.zing.vn/images/rich/2012/standard_1343015661.swf";
var banner_expand_url_clear = "http://img.ad.zing.vn/images/rich/2012/expand_1343015661.swf";
var jquery_file_clear = 'http://img.ad.zing.vn/js/jquery-1.5.js';
var html_doc_clear	=	document.getElementsByTagName('head')[0];
var flash_prefix_clear	=	'clear';
var	flashvar_standard_clear = "pre_expand=" + pre_expand_clear +"&JSName="+flash_prefix_clear+"&impressionTracking="+impressionTracking_clear+"&clickTAG="+o_tracker_url;
var flashvar_expand_clear = "pre_expand=" + pre_expand_clear +"&JSName="+flash_prefix_clear+"&clickTAG="+o_tracker_url;

function loadLib(lib_js_file){
	var morejs = document.createElement('script');
	morejs.setAttribute('type', 'text/javascript');
	morejs.setAttribute('src', lib_js_file);
	html_doc_clear.appendChild(morejs);		
}
function show_clear(){
	var flash_standard_clear = '';
	var	flash_standard_style_clear	=	'position:absolute; z-index:100; display: block; width: ' + width_banner_clear + 'px; height: ' + height_banner_clear + 'px; overflow: hidden;';
	var style_container_clear = "z-index:100; width:" + width_banner_clear + "px; height:" + height_banner_clear + "px; overflow: hidden;";
	
	flash_standard_clear += '<div id="' + flash_prefix_clear + '_flash_standard" style="' + flash_standard_style_clear + '">';
    flash_standard_clear += '<embed src="' + banner_standard_url_clear + '"';
	flash_standard_clear += ' width="' + width_banner_clear + '"';
	flash_standard_clear += ' height="' + height_banner_clear + '"';
	flash_standard_clear += ' type="application/x-shockwave-flash"';
	flash_standard_clear += ' flashvars="' + flashvar_standard_clear + '"';
	flash_standard_clear += ' wmode="transparent" ';
	flash_standard_clear += ' allowScriptAccess="always" ';
	flash_standard_clear += ' quality="high" ';
	flash_standard_clear += ' scaleMode="noScale" ';
	flash_standard_clear += ' menu="false" ';
	flash_standard_clear += ' pluginspage="http://www.macromedia.com/go/getflashplayer">';
	flash_standard_clear += '</embed></div>';	

	
	document.writeln('<div id="' + flash_prefix_clear + '_container" style="' + style_container_clear + '">');
	document.writeln(flash_standard_clear);
	document.writeln("</div>");	
}

function expand_clear(){
	$(document).ready(function () {
		var flash_expand_clear = '';
		var	flash_expand_style_clear	=	'position:absolute; right: 0px; z-index:100; display: none; width: ' + fullwidth_banner_clear + 'px; height: ' + fullheight_banner_clear + 'px; overflow: hidden;';		
		flash_expand_clear += '<div onmouseout="shrink_clear();" id="' + flash_prefix_clear + '_flash_expand" style="' + flash_expand_style_clear + '">';
		flash_expand_clear += '<embed src="' + banner_expand_url_clear + '"';
		flash_expand_clear += ' width="' + fullwidth_banner_clear + '"';
		flash_expand_clear += ' height="' + fullheight_banner_clear + '"';
		flash_expand_clear += ' type="application/x-shockwave-flash"';
		flash_expand_clear += ' flashvars="' + flashvar_expand_clear + '"';
		flash_expand_clear += ' wmode="transparent" ';
		flash_expand_clear += ' allowScriptAccess="always" ';
		flash_expand_clear += ' quality="high" ';
		flash_expand_clear += ' scaleMode="noScale" ';
		flash_expand_clear += ' menu="false" ';
		flash_expand_clear += ' pluginspage="http://www.macromedia.com/go/getflashplayer">';
		flash_expand_clear += '</embed></div>';		
		$('#' + flash_prefix_clear + '_container').append(flash_expand_clear);						
		$('#' + flash_prefix_clear + '_flash_expand').show();								
		$('#' + flash_prefix_clear + '_flash_standard').hide();
	});	
}
function shrink_clear() {
	$('#' + flash_prefix_clear + '_flash_expand').hide();
	$('#' + flash_prefix_clear + '_flash_standard').show();
}
if(typeof jQuery == 'undefined'){
	loadLib(jquery_file_clear);
}
show_clear();